package com.ele.client.rpc;

import com.ele.model.Answer;
import com.ele.model.AppUser;
import com.ele.model.Section;
import com.ele.model.Word;
import com.ele.shared.action.Action;
import com.ele.shared.dto.grid.SectionGridRow;
import com.ele.shared.dto.grid.WordGridRow;
import com.google.gwt.user.client.rpc.AsyncCallback;

import java.util.List;
import java.util.Set;

public interface ApplicationServiceAsync {
    void getMessage(String msg, AsyncCallback<String> callback);

    void getLessonGridData(AsyncCallback<List<SectionGridRow>> callback);

    void deleteLessons(Set<Long> set, AsyncCallback<Void> callback);

    void deleteWords(Set<Long> set, AsyncCallback<Void> callback);

    void getWordGridData(AsyncCallback<List<WordGridRow>> callback);

    void getWord(Long id, AsyncCallback<Word> callback);

    void saveWord(Word word, AsyncCallback<Word> callback);

    void getSection(Long id, AsyncCallback<Section> callback);

    void saveSection(Section value, AsyncCallback<Section> callback);

    void attachWords(Set<Long> set, Long sectionId, AsyncCallback<Void> callback);

    void login(String email, String password, AsyncCallback<AppUser> callback);

    void signUp(String email, String password, AsyncCallback<AppUser> callback);

    void getCurrentSection(AsyncCallback<Section> callback);

    void generateAnswer(String questionText, AsyncCallback<List<Answer>> callback);

    void checkAnswer(String answer, Long questionId, AsyncCallback<Boolean> callback);

    void getActionsList(String answer, AsyncCallback<List<Action>> callback);

    void getUser(AsyncCallback<AppUser> async);
}
